/*******************************************************************************
 * Copyright (c) 2006 CEA List.
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License v1.0
 * which accompanies this distribution, and is available at
 * http://www.eclipse.org/legal/epl-v10.html
 *
 * Contributors:
 *     CEA List - initial API and implementation
 *******************************************************************************/
package com.cea.papyrus.core.commands.connection;

import org.eclipse.draw2d.geometry.Point;
import org.eclipse.uml2.uml.Element;

import com.cea.papyrus.core.helper.EdgeInstanceSpecificationHelper;
import com.cea.papyrus.diagraminterchange2.di2.GraphEdge;
import com.cea.papyrus.diagraminterchange2.di2.GraphElement;

/**
 * 
 * 
 * @author CEA List
 */
public class InstanceSpecificationLinkCreateCommand extends ConnectionCreateCommand {
	

	/**
	 * Instantiate a command that can create a connection between two Elements.
	 * 
	 * @param type of the link Dependency, azssociation...
	 * @param location 
	 * @param source the source endpoint
	 * @param point 	 */
	public InstanceSpecificationLinkCreateCommand(GraphElement source, Object type, Point location) {
		super(source, type, location);

			}
	
	/**
	 * 
	 * 
	 * @param umlLink 
	 * 
	 * @return 
	 */
	protected GraphEdge createGraphEdge(Element umlLink) {
		EdgeInstanceSpecificationHelper eish= new EdgeInstanceSpecificationHelper();
		return  (GraphEdge)eish.createGraphElement(umlLink, null, null, null);
	}
}
